/*
Naijanimi Free SMS Application for Nokia mobiles.

"Naijanimi Free SMS Application" is protected by the copyright law
(c) 2011 Enrico Miglino / Tech Consulting (enrico.miglino@ovi.com)
Distributed under the LGPL 3.0 license.

This file is part of "Naijanimi Free SMS Application".

    "Naijanimi Free SMS Application" is free software: you can redistribute it
    and/or modify it under the terms of the Lesser GNU General Public License
    as published by the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    "Naijanimi Free SMS Application" is distributed in the hope that it
    will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    Lesser GNU General Public License for more details.

    You should have received a copy of the Lesser GNU General Public License
    along with "Naijanimi Free SMS Application".
    If not, see <http://www.gnu.org/licenses/>.
*/

import QtQuick 1.0

// Tabbed Area is the generic definition of the rectagnle that surround
// the forms and objects in every tab of the ProgramFeatures tab list.
// Here are defined the essential characteristics of the rectangle, while
// the specifc elements, i.e. the contained forms, images, data etc for every
// tab should be defined when the component is instantiated.
// Every tab element should contain.
Rectangle {
    id: areaBackground

    property string title: "Set Tab Name"

    signal forceExitClicked

    anchors.fill: parent; border.color: "#e3e3e3"; border.width: 1; radius:  10
    gradient: Gradient {
        GradientStop {
            position: 0.00;
            color: "#507982";
        }
        GradientStop {
            position: 0.10;
            color: "#e3e3e3";
        }
        GradientStop {
            position: 0.90;
            color: "#e3e3e3";
        }
        GradientStop {
            position: 1.00;
            color: "#ffffff";
        }
    }
    // Exit Button to close the Object at all, regardless of the
    // elements contained on the tabbed area.
    Rectangle {
        id: forceExit

        color: "lightgrey"
        border.color: "white"
        border.width: 1
        width: parent.width * 0.20
        height: 25
        radius: 5
        anchors.top: parent.top
        anchors.topMargin: parent.height * 0.10
        anchors.right: parent.right
        anchors.rightMargin: parent.width * 0.025

        // Button text
        Text {
            id: textExit

            text: "EXIT"
            color: "white"
            font.pixelSize: 15
            anchors.horizontalCenter: parent.horizontalCenter
            anchors.verticalCenter: parent.verticalCenter
        }

        // Exit event management
        MouseArea {
            id: mouseArea
            anchors.fill: parent
            onClicked: {
                areaBackground.forceExitClicked()
            }
        }
    }
}
